package com.linsen.gateway.handler;

import com.linsen.core.common.enums.EnvType;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Mono;

/**
 * 网关默认首页
 * @author zhaoyong
 * @date 2023/3/13
 */
@RestController
public class IndexHandler {
    @Value("${spring.profiles.active}")
    private String env;

    @GetMapping("/")
    public Mono<String> index() {
        return Mono.just(desc());
    }

    private String desc() {
        return "<div>gateway has been started!</div>";
    }
}
